/**
 * @author zhengjiachao
 * @since 2017-3-27
 */
VUEADF.control.XYComposite = function() {
    VUEADF.control.XYComposite.superclass.constructor.call(this);
};

COM.util.defineClass(VUEADF.control.XYComposite, ADF.CompositeDescriptor, {

    getEditpart: function() {
        var editpart = function() {
            editpart.superclass.constructor.call(this);
        };
        COM.util.defineClass(editpart, ADF.editpart.CompositeEditpart, {
            _createFigure: function() {
                var xyCompositeFigure = new VUEADF.figure.XYCompositeFigure();
                var xyComposite = this.getWidgetFactory().createControl(this.getModel());
                xyCompositeFigure.setWidget(xyComposite);
                return xyCompositeFigure;
            },
            createEditPolicies: function() {
                editpart.superclass.createEditPolicies.call(this);
                this.installEditPolicy(COM.gef.EditPolicy.LAYOUT_ROLE, new VUEADF.policy.XYCompositeLayoutPolicy());
                // this.installEditPolicy(COM.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new VUEADF.policy.SnapPolicy());
            },
            getModelChildren: function(){
                var composite = this.getModel();
                return composite.getChildren();
            },
            refreshChildren: AGEF.functions.editPartRefreshChildren,
        });
        return editpart;
    },

    getModel: function() {
        return VUEADF.model.XYCompositeModel;
    },

    getDomControl : function(){
        return VUEADF.domControl.XYComposite;
    }

});
